package com.hxd.otc.widget;

import android.content.Context;
import android.support.v7.widget.AppCompatButton;
import android.util.AttributeSet;
import android.view.Gravity;

import com.hxd.otc.R;
import com.hxd.otc.utils.DataUtils;

/**
 * Created by lzy on 2018/6/8 0008.
 * description ${普通按钮}
 */
public class NormalButton extends AppCompatButton {
    public NormalButton(Context context) {
        this(context, null);
    }

    public NormalButton(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public NormalButton(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, android.R.attr.borderlessButtonStyle);
        setBackgroundResource(R.drawable.selector_button_nor_bg);
        setTextColor(getResources().getColorStateList(R.color.selector_button_nor_text));
        setGravity(Gravity.CENTER);
        setTextSize(14);
        setMinHeight(DataUtils.dp2px(getContext(), 45));
    }
}
